package org.androidpn.server.service.impl;

import java.util.List;

import org.androidpn.server.dao.MessageDao;
import org.androidpn.server.model.Message;
import org.androidpn.server.service.MessageService;

public class MessageServiceImpl implements MessageService{

	
	private MessageDao messageDao;
	
	public void setMessageDao(MessageDao messageDao){
		this.messageDao = messageDao;
	}
	
	public List<Message> getAllMessage() {
		return messageDao.findAll("from Message m order by m.id desc");
	}

}
